Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

feature/intro/src/commonMain/kotlin/org/meshtastic/feature/intro/LocationScreen.kt fix/fdroid-map-rendering (113121c4) Text, 4.35 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.intro

Tff7b72import T7ee787androidx.compose.material3.Surface
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.ui.tooling.preview.PreviewLightDark
Tff7b72import T7ee787org.meshtastic.core.resources.Res
Tff7b72import T7ee787org.meshtastic.core.resources.configure_location_permissions
Tff7b72import T7ee787org.meshtastic.core.resources.distance_filters
Tff7b72import T7ee787org.meshtastic.core.resources.distance_filters_description
Tff7b72import T7ee787org.meshtastic.core.resources.distance_measurements
Tff7b72import T7ee787org.meshtastic.core.resources.distance_measurements_description
Tff7b72import T7ee787org.meshtastic.core.resources.mesh_map_location
Tff7b72import T7ee787org.meshtastic.core.resources.mesh_map_location_description
Tff7b72import T7ee787org.meshtastic.core.resources.next
Tff7b72import T7ee787org.meshtastic.core.resources.phone_location
Tff7b72import T7ee787org.meshtastic.core.resources.phone_location_description
Tff7b72import T7ee787org.meshtastic.core.resources.settings
Tff7b72import T7ee787org.meshtastic.core.resources.share_location
Tff7b72import T7ee787org.meshtastic.core.resources.share_location_description
Tff7b72import T7ee787org.meshtastic.core.ui.icon.HardwareModel
Tff7b72import T7ee787org.meshtastic.core.ui.icon.LocationOn
Tff7b72import T7ee787org.meshtastic.core.ui.icon.MeshtasticIcons
Tff7b72import T7ee787org.meshtastic.core.ui.theme.AppTheme

T8b949e/**
* Screen for configuring location permissions during the app introduction. It explains why location permissions are
* needed and provides options to grant them or skip.
*
* @param showNextButton Indicates whether to show a "Next" button (if permissions are already granted) or a "Configure"
* button.
* @param onSkip Callback invoked if the user chooses to skip location permission setup.
* @param onConfigure Callback invoked when the user proceeds to configure or grant permissions.
* @param onOpenSettings Callback invoked when the user taps the settings link.
*/
Tf0883e@Composable
Tff7b72internal Tff7b72fun Td2a8ffLocationScreenTb4b4b4(
Te6edf3showNextButtonTb4b4b4: Tffa657BooleanTb4b4b4,
Te6edf3onSkipTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3onConfigureTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3onOpenSettingsTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Tb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3annotatedString Tff7b72=
Te6edf3createClickableAnnotatedStringTb4b4b4(
Te6edf3fullTextRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3phone_location_descriptionTb4b4b4,
Te6edf3linkTextRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3settingsTb4b4b4,
Te6edf3tag Tff7b72= Te6edf3SETTINGS_TAGTb4b4b4,
Tb4b4b4)

Tff7b72val Te6edf3features Tff7b72=
Te6edf3listOfTb4b4b4(
Te6edf3FeatureUIDataTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3MeshtasticIconsTb4b4b4.Te6edf3LocationOnTb4b4b4,
Te6edf3titleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3share_locationTb4b4b4,
Te6edf3subtitleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3share_location_descriptionTb4b4b4,
Tb4b4b4)Tb4b4b4,
Te6edf3FeatureUIDataTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3MeshtasticIconsTb4b4b4.Te6edf3HardwareModelTb4b4b4,
Te6edf3titleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3distance_measurementsTb4b4b4,
Te6edf3subtitleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3distance_measurements_descriptionTb4b4b4,
Tb4b4b4)Tb4b4b4,
Te6edf3FeatureUIDataTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3MeshtasticIconsTb4b4b4.Te6edf3HardwareModelTb4b4b4,
Te6edf3titleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3distance_filtersTb4b4b4,
Te6edf3subtitleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3distance_filters_descriptionTb4b4b4,
Tb4b4b4)Tb4b4b4,
Te6edf3FeatureUIDataTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3MeshtasticIconsTb4b4b4.Te6edf3LocationOnTb4b4b4,
Te6edf3titleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3mesh_map_locationTb4b4b4,
Te6edf3subtitleRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3mesh_map_location_descriptionTb4b4b4,
Tb4b4b4)Tb4b4b4,
Tb4b4b4)

Te6edf3PermissionScreenLayoutTb4b4b4(
Te6edf3headlineRes Tff7b72= Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3phone_locationTb4b4b4,
Te6edf3annotatedDescription Tff7b72= Te6edf3annotatedStringTb4b4b4,
Te6edf3features Tff7b72= Te6edf3featuresTb4b4b4,
Te6edf3onSkip Tff7b72= Te6edf3onSkipTb4b4b4,
Te6edf3onConfigure Tff7b72= Te6edf3onConfigureTb4b4b4,
Te6edf3configureButtonTextRes Tff7b72= Tff7b72if Tb4b4b4(Te6edf3showNextButtonTb4b4b4) Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3next Tff7b72else Te6edf3ResTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3configure_location_permissionsTb4b4b4,
Te6edf3onAnnotationClick Tff7b72= Tb4b4b4{ Te6edf3onOpenSettingsTb4b4b4(Tb4b4b4) Tb4b4b4}Tb4b4b4,
Tb4b4b4)
Tb4b4b4}

Tf0883e@PreviewLightDark
Tf0883e@Composable
Tff7b72private Tff7b72fun Td2a8ffLocationScreenPreviewTb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3AppTheme Tb4b4b4{ Te6edf3Surface Tb4b4b4{ Te6edf3LocationScreenTb4b4b4(Te6edf3showNextButton Tff7b72= Tff7b72falseTb4b4b4, Te6edf3onSkip Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4, Te6edf3onConfigure Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4, Te6edf3onOpenSettings Tff7b72= Tb4b4b4{Tb4b4b4}Tb4b4b4) Tb4b4b4} Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.05s